Three streams are automatically opened when a C program begins execution: stdin, stdout, and stderr. These represent the standard input device, standard output device, and the device for reporting errors, respectively.
By default these devices usually refer to the user's terminal. TC automatically creates a "console" text window on the Macintosh when a function refers to one of these streams. (On UNIX systems these streams can be "redirected" to refer to text files, and this may be emulated on the Macintosh using TC's ccommand() console function.)
The powerful printf() and scanf() standard functions write to and read from the standard output and standard input devices. Their prototypes are:
int printf(char *format_string, ...); /* variable number of arguments */
int scanf(char *format_string, ...);
The format string contains conversion codes such as %d (integer value), %ld (long